import axios from 'axios'
import { setupInterceptor } from './interceptors'

function createAxios(option?: any) {
  const service = axios.create({
    timeout: option?.timeout || 120000,
    baseURL: '/api'
  })
  setupInterceptor(service)
  return service
}

export const defAxios = createAxios();
